package model

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ AwPermissionsModel = (*customAwPermissionsModel)(nil)

type (
	// AwPermissionsModel is an interface to be customized, add more methods here,
	// and implement the added methods in customAwPermissionsModel.
	AwPermissionsModel interface {
		awPermissionsModel
		withSession(session sqlx.Session) AwPermissionsModel
	}

	customAwPermissionsModel struct {
		*defaultAwPermissionsModel
	}
)

// NewAwPermissionsModel returns a model for the database table.
func NewAwPermissionsModel(conn sqlx.SqlConn) AwPermissionsModel {
	return &customAwPermissionsModel{
		defaultAwPermissionsModel: newAwPermissionsModel(conn),
	}
}

func (m *customAwPermissionsModel) withSession(session sqlx.Session) AwPermissionsModel {
	return NewAwPermissionsModel(sqlx.NewSqlConnFromSession(session))
}
